//
//  SubscribePayCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/21.
//

import UIKit

class SubscribePayCell: UITableViewCell {
    lazy var backView: UIView = {
       let view = UIView()
        view.backgroundColor = UIColor(hexString: "#FFFFFF", transparency: 0.1)
        view.allRound(8)
        return view
    }()
      
     lazy var logoIV: UIImageView = {
       let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_vip_alipay")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
     lazy var titleLb: UILabel = {
       let label = UILabel()
        label.text = "支付宝"
        label.textColor = .white
        label.font = UIFont.pingFangSCMedium(ofSize: 16)
        return label
    }()
    
     lazy var selectBtn: UIButton = {
        let button = UIButton(type: .custom)
        button.imageForNormal = UIImage(named: "icon_vip_nor")
        button.imageForSelected = UIImage(named: "icon_vip_sel")
        button.isUserInteractionEnabled = false
        return button
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = .clear
        self.selectionStyle = .none
        self.contentView.addSubviews([backView])
        backView.addSubviews([logoIV, titleLb, selectBtn])
        
        backView.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(10)
            make.leading.trailing.equalToSuperview().inset(14)
            make.height.equalTo(60)
            make.bottom.equalToSuperview()
        }
        
        logoIV.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.leading.equalToSuperview().offset(10)
            make.width.height.equalTo(32)
        }
     
        titleLb.snp.makeConstraints { make in
            make.leading.equalTo(logoIV.snp.trailing).offset(15)
            make.centerY.equalToSuperview()
        }
        
        selectBtn.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalToSuperview().offset(-10)
        }
    }
    
 
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
